Skip to content

Hatch the usage spent since the panel last showed each bar - #49

Merged
poweruserz merged 3 commits into
mainfrom
feat/unseen-usage
Oct 30, 2026
Merged

poweruserz merged 3 commits into
mainfrom
feat/unseen-usage

Conversation

@poweruserz

@poweruserz poweruserz commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Description

When the panel opens, the part of each bar used up while it was closed blinks hatched (in the bar's own color) for 3.5 s, then the fill grows over it in 0.7 s and it counts as seen. Every progress bar of every provider, on the overview and the provider pages.

  • Seen = the used percent a bar last showed in the open panel, kept in memory per plugin + line (use-unseen-usage.ts). A page switch keeps it; a restart starts from the first data.
  • Kept in used terms, so switching used/left isn't spending. Showing what's left, the hatch is the piece the fill lost.
  • A reset (usage going down from the last value it got, even while still above what was seen) isn't spending: it becomes the new start.
  • The hatch is drawn while the panel is hidden too, so opening the panel doesn't first show the new fill and then take it back. The timers only run while it's open; closing it mid-blink keeps it for the next open, and more usage while it blinks starts it over from what was seen.
  • Open is asked from the OS (getCurrentWindow().isVisible() on focus, blur and visibilitychange, one answer shared by all bars): the hidden panel's webview reports itself visible before its first show.
  • Reduced motion: the hatch doesn't blink.

Type of Change

  • New feature

Testing

  • bunx tsc --noEmit, bun run test (1408 passed)
  • New tests: the hook's whole flow (hidden, open, blink, settle, seen), a reset, closing mid-blink, more usage while blinking, no key; the bar's hatch and fill in both display modes; the card's wiring per plugin + line.
  • Tried in a running dev build (with 5 fake unseen points per bar, removed before the commit): the log showed the panel open detected and the hatch started on the Claude bars; the owner looked at it and asked to ship.

Checklist

  • My PR targets the main branch
  • I did not introduce new dependencies without justification

🤖 Generated with Claude Code

https://claude.ai/code/session_01KHc1HaoK4c5kUmgtCmKuwT

When the panel opens, the part of a bar used up while it was closed blinks
hatched for a few seconds, then the fill grows over it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KHc1HaoK4c5kUmgtCmKuwT
@github-actions github-actions Bot added the core label Oct 30, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T15:02:22.720956Z 1aae377 New commits
🔒 Security Review ✅ Completed 2026-10-30T15:02:11.150224Z 1aae377 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9446269f91

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/hooks/use-unseen-usage.ts Resolved
@greptile-apps

greptile-apps Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

Adds a hatched section showing usage gained since each bar was last seen.

  • Progress bars hatch new usage until their fill catches up.

The merge-base checks differed, so this review checked the full PR diff for new issues. No new actionable issues were found.

Reviews (3) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

Comment thread src/hooks/use-unseen-usage.ts Resolved
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Claude review

Commit 1aae377

VERDICT: CLEAN
Not reviewed: none

@poweruserz
poweruserz merged commit a168785 into main Oct 30, 2026
8 checks passed
@poweruserz poweruserz mentioned this pull request Oct 30, 2026
4 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant